﻿namespace WMS6.Web
{
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Web;
    using WMS6.Web.CommonMethodServiceRef;

    public class CommoneMethodServiceClientProxy : BasePage
    {
        public string AuditContractByContractID(List<string> ContractID, string audit)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                result = client.AuditContractByContractID(ContractID, audit, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string CreatedLocation(CreatedLocationinfo CreateLocation, LocationInfo Location)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                result = client.CreatedLocation(CreateLocation, Location, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string DeleteCustGridviewInfos(string functionID, string gridviewID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                result = client.DeleteCustGridviewInfos(functionID, gridviewID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public List<AppSettingInfo> GetAllAppSettingInfo()
        {
            List<AppSettingInfo> appSettingInfoList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                appSettingInfoList = client.GetAllAppSettingInfo();
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return appSettingInfoList;
        }

        public List<VisualLocationInfo> GetAllVisualLocationInfo(VisualLocationQueryEntity VisualocQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<VisualLocationInfo> visualLocationInfoList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                visualLocationInfoList = client.GetAllVisualLocationInfo(VisualocQuery, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return visualLocationInfoList;
        }

        public AppRegInfo GetAppRegInfo()
        {
            PubParasInfo pubParasInfo = new PubParasInfo {
                UserID = "DBA",
                UserLanguage = "zh-CN",
                CurrentWH = "10"
            };
            AppRegInfo appRegInfo = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                appRegInfo = client.GetAppRegInfo(pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return appRegInfo;
        }

        public DataSet GetAuthorizationUserByType(string Type, string entityID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            DataSet ds = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                ds = client.GetAuthorizationUserByType(Type, entityID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public List<OwnerInfo> GetAuthorizedOwnerByUserID()
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<OwnerInfo> ownerInfoList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                ownerInfoList = client.GetAuthorizedOwnerByUserID(pubParasInfo.UserID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ownerInfoList;
        }

        public decimal GetAvailableQty(string ownerID, string skuID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            decimal result = 0M;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                result = client.GetAvailableQty(ownerID, skuID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public List<CartonGroup4DDL> GetCartonGroup4Select()
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<CartonGroup4DDL> CartonGroup4DDLList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                CartonGroup4DDLList = client.GetCartonGroup4Select(pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return CartonGroup4DDLList;
        }

        public List<CustGridviewInfo> GetCustGridviewInfos(string functionID, string gridviewID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<CustGridviewInfo> custGridviewInfoList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                custGridviewInfoList = client.GetCustGridviewInfos(functionID, gridviewID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return custGridviewInfoList;
        }

        public List<CycleCountRule4DDL> GetCycleCountRule4Select()
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<CycleCountRule4DDL> CycleCountRule4DDLList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                CycleCountRule4DDLList = client.GetCycleCountRule4Select(pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return CycleCountRule4DDLList;
        }

        public List<FieldNameInfo> GetFieldNameByTableName(string TableName)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<FieldNameInfo> FieldNameInfoList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                FieldNameInfoList = client.GetFieldNameByTableName(TableName, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return FieldNameInfoList;
        }

        public DataSet GetInitGridViewInfoByQueryEntity(InitGridviewQueryEntity initGridviewQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            DataSet ds = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                ds = client.GetInitGridViewInfoByQueryEntity(initGridviewQuery, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public List<InitGridviewInfo> GetInitGridviewInfos(string functionID, string gridviewID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<InitGridviewInfo> initGridviewInfoList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                initGridviewInfoList = client.GetInitGridviewInfos(functionID, gridviewID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return initGridviewInfoList;
        }

        public static CommoneMethodServiceClientProxy GetInstance()
        {
            return new CommoneMethodServiceClientProxy();
        }

        public DataSet GetInvSkuQtyByOwnerID(string OwnerID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            DataSet ds = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                ds = client.GetInvSkuQtyByOwnerID(OwnerID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public List<LotAttributeCodeInfo> GetLotAttributCodeByGroupID(string GroupID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<LotAttributeCodeInfo> lotAttributeCodeInfoList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                lotAttributeCodeInfoList = client.GetLotAttributCodeByGroupID(GroupID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return lotAttributeCodeInfoList;
        }

        public List<string> GetLotAttributeCode4LotTemplate()
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<string> stringList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                stringList = client.GetLotAttributeCode4LotTemplate(pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return stringList;
        }

        public List<LotTemplate4DDL> GetLotTemplate4Select()
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<LotTemplate4DDL> LotTemplate4DDLList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                LotTemplate4DDLList = client.GetLotTemplate4Select(pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return LotTemplate4DDLList;
        }

        public LotTemplateInfo GetLotTemplateInfo(string SkuID, string OwnerID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            LotTemplateInfo lotTemplateInfo = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                lotTemplateInfo = client.GetAttributeInfoBySkuID(SkuID, OwnerID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return lotTemplateInfo;
        }

        public List<PreferenceValueInfo> GetPreferenceValueByID(string preferenceID)
        {
            List<PreferenceValueInfo> preferenceValueInfoList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                preferenceValueInfoList = client.GetPreferenceValueByID(preferenceID);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return preferenceValueInfoList;
        }

        public List<ReceiptValidation4DDL> GetReceiptValidation4Select()
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<ReceiptValidation4DDL> ReceiptValidation4DDLList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                ReceiptValidation4DDLList = client.GetReceiptValidation4Select(pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ReceiptValidation4DDLList;
        }

        public DataSet GetRelatedOrders(string Type, string skuID, string ownerID, string lot, string loc, string lpn)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            DataSet ds = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                ds = client.GetRelatedOrders(Type, skuID, ownerID, lot, loc, lpn, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public List<Rule4DDL> GetRules4Select(string ruleID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<Rule4DDL> rule4DDLList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                rule4DDLList = client.GetRules4Select(ruleID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return rule4DDLList;
        }

        public DataSet GetShowGridviewInfo(string functionID, string gridviewID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            DataSet ds = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                ds = client.GetShowGridviewInfo(functionID, gridviewID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public SkuInfo GetSkuByBarcode(string Barcode)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            SkuInfo skuInfo = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                skuInfo = client.GetSkuByBarcode(Barcode, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return skuInfo;
        }

        public SkuInfo GetSkuInfoByUserOwner(string skuID, string userID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            SkuInfo skuInfo = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                skuInfo = client.GetSkuInfoByUserOwner(skuID, userID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return skuInfo;
        }

        public List<SysCode4DDL> GetSysCode4DDL()
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<SysCode4DDL> sysCode4DDLList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                sysCode4DDLList = client.GetSysCode4DDL(pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return sysCode4DDLList;
        }

        public List<SysCode4DDL> GetSysCodeDataSource(string codeType)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string language = base.UserInfo.Preference.Lang;
            List<SysCode4DDL> SysCode4DDLList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                SysCode4DDLList = client.GetSysCodeForDropDownList(codeType, language, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return SysCode4DDLList;
        }

        public List<UomList> GetUomListByPackID(string packID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<UomList> uomList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                uomList = client.GetUomListByPackID(packID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return uomList;
        }

        public List<WareHouseName4DDL> GetUserPermissionWareHouse()
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            List<WareHouseName4DDL> wareHouseName4DDLList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                wareHouseName4DDLList = client.GetUserPermissionWareHouse(pubParasInfo.UserID);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return wareHouseName4DDLList;
        }

        public List<WareHouseName4DDL> GetWareHouseDataSource()
        {
            List<WareHouseName4DDL> wareHouseName4DDLList = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                wareHouseName4DDLList = client.GetWareHouse4Select();
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return wareHouseName4DDLList;
        }

        public string ImportByData(List<List<string>> ImportByData, string IsUpdate, string dataName)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                result = client.ImportByData(ImportByData, dataName, IsUpdate, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string ImportByDataSet(DataSet ds, string dataName)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                result = client.ImportByDataSet(ds, dataName, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        private PubParasInfo InitPubParasInfo()
        {
            if (base.UserInfo != null)
            {
                return new PubParasInfo { UserID = base.UserInfo.UserID, UserLanguage = base.UserInfo.Preference.Lang, CurrentWH = base.UserInfo.CurrentWH };
            }
            HttpContext.Current.Response.Redirect("../Login.aspx?from=Logout", true);
            return null;
        }

        public string InsertCustGridviewInfos(List<CustGridviewInfo> custGridviewInfo)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                result = client.InsertCustGridviewInfos(custGridviewInfo, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string LpnGenerateByGenerateType(LPNGenParams lpnGenParams)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                result = client.LpnGenerateByGenerateType(lpnGenParams, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public DataSet SearchDataByKey(string key, string key2, string type)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            DataSet ds = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                ds = client.SearchDataByKey(key, key2, type, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public string SqlAnalyse(string strSql)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                result = client.SqlAnalyse(strSql, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public DataSet SqlQuery(string sql, BaseQuery baseQuery)
        {
            DataSet ds = null;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                ds = client.SqlQuery(sql, baseQuery);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public string UpdateAuditDefinitionInfoByList(List<AuditDefinitionInfo> objs)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                result = client.UpdateAuditDefinitionInfoByList(objs, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public int UpdateAuthorizationUserByType(string authorizationUser, string Type, string entityID)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            int i = 0;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                i = client.UpdateAuthorizationUserByType(authorizationUser, Type, entityID, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return i;
        }

        public string UpdateRegID(string regIDValue)
        {
            PubParasInfo pubParasInfo = new PubParasInfo {
                UserID = "DBA",
                UserLanguage = "zh-CN",
                CurrentWH = "10"
            };
            string result = string.Empty;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                result = client.UpdateRegID(regIDValue, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }

        public string UpdateUDF(string ID, UDFInfo udfInfo, string strType)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            string result = string.Empty;
            CommonMethodServiceClient client = new CommonMethodServiceClient("WSHttpBinding_ICommonMethodService");
            try
            {
                result = client.UpdateUDF(ID, udfInfo, strType, pubParasInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return result;
        }
    }
}

